﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" 
    x:Class="WPControla.Client.MainPage"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" DataContext="{Binding MainViewModel, Source={StaticResource locator}}"
	shell:SystemTray.BackgroundColor="#FF25A0DB" shell:SystemTray.ForegroundColor="LightBlue">

    <controls:Panorama Margin="0" Background="{StaticResource BackgroundColor}" Foreground="White">
		<controls:Panorama.Title>
    		<StackPanel Margin="0,80,0,0" Height="107" Orientation="Horizontal" VerticalAlignment="Top">
    			<Image Height="96" Margin="0" Source="images/header_logo.jpg" Stretch="Fill" VerticalAlignment="Center" Width="102" HorizontalAlignment="Left"/>
    			<TextBlock TextWrapping="Wrap" Text="Controla" VerticalAlignment="Center" Foreground="White" Margin="10,0,0,0" FontSize="{StaticResource PhoneFontSizeExtraExtraLarge}" FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
    		</StackPanel>
		</controls:Panorama.Title>
		<controls:PanoramaItem Header="Capítulos">
			<Grid>
				<ListBox x:Name="lstChapters" ItemsSource="{Binding ChaptersList.Items}"
                         ItemTemplate="{StaticResource PodcastTemplate}"
                         SelectedItem="{Binding SelectedChapter, Mode=TwoWay}">
				</ListBox>
			</Grid>
		</controls:PanoramaItem>
		<controls:PanoramaItem Header="Artículos">
			<Grid>
                <ListBox x:Name="lstArticles" ItemsSource="{Binding ArticlesList.Items}"
                         ItemTemplate="{StaticResource ArticlesTemplate}">
                </ListBox>
            </Grid>
		</controls:PanoramaItem>
		<controls:PanoramaItem Header="Twitter">
			<Grid>
				<ListBox x:Name="lstTwitter" ItemsSource="{Binding TwitterList.Items}"
                         ItemTemplate="{StaticResource TwitterTemplate}">
				</ListBox>
			</Grid>
		</controls:PanoramaItem>
	</controls:Panorama>

</phone:PhoneApplicationPage>